package teste;

import java.sql.SQLException;
import java.sql.Timestamp;
import java.text.ParseException;
import java.util.Calendar;
import java.sql.Date;

import util.TimeZoneUtil;
import util.TimestampUtil;

public class teste {

	public static void main(String[] args) throws SQLException, ParseException {
		
	//	Connection conn = new Conexao().getConexao();
		
	//	System.out.println(new Date());
		
		//select sum(datafinal - datainicial) / count(datainicial) as media from teste
		
		
	//	Timestamp datainicial = new Timestamp(new TimeZoneUtil().fuzoHorario());
		//System.out.println(datainicial);
		
	//	String sql = "insert into teste(datainicial) values(?)";
		
//		PreparedStatement ps = conn.prepareStatement(sql);
//		ps.setTimestamp(1, datainicial);
//		ps.execute();
//		ps.close();
		
//		SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
//		TimeZone zone = TimeZone.getDefault();
//		System.out.println(zone);
		
//		TimeZone timeZone = TimeZone.getTimeZone("Asia/Tokyo");
//		//System.out.println(timeZone);
//		Calendar cal = new GregorianCalendar();
//		cal.setTimeZone(timeZone);
//		System.out.println(cal.get(Calendar.YEAR));
		
		
	    Calendar calendar = Calendar.getInstance();  
	    System.out.println(calendar); // data de hoje  
	      
	    calendar.add(Calendar.HOUR_OF_DAY, -720); // tirando horas gastas pra fazer a arte
	    System.out.println(calendar.getTime());
		
		
		
	}
	
}
